package cn.laowen.basic.mapper;

import cn.laowen.basic.query.BasicQuery;

import java.util.List;


public interface BasicMapper<T>{
    //查询全表
    List<T> loadAll();

    //查询一条
    T loadById(Long id);

    //新增
    void save(T t);
    //修改
    void update(T t);
    //删除一条
    void deleteById(Long id);

    //查询总条数
    Long queryCount(BasicQuery basicQuery);

    //查询当前页数据
    List<T> queryData(BasicQuery basicQuery);

    //批量删除
    void batchRemove(List<Long> ids);
}
